package com.sias.Loli.controller;

import com.sias.Loli.entity.Leader;
import com.sias.Loli.service.intf.LeaderLogService;
import com.sias.Loli.vo.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
public class LeaderLogController {
    @Autowired
    private LeaderLogService logService;
    @RequestMapping("/api/loli/leaderLogController.do")
    @ResponseBody
    public PageBean selectLeaderLog(HttpSession session){
        Leader user = (Leader)session.getAttribute("user");
        PageBean pageBean = logService.selectLeaderLog(user.getId());
        return pageBean;
    }
}
